#include <QSvgRenderer>
#include <QPainter>
#include "AboutDialog.h"

AboutDialog::AboutDialog(QWidget *parent) : DAboutDialog(parent)
{

    QPixmap pixmap(80, 80);
    pixmap.fill(Qt::transparent);
    QPainter painter(&pixmap);
    painter.setRenderHint(QPainter::Antialiasing);
    QSvgRenderer taskSvg(QString(":/pics/task.svg"));
    taskSvg.render(&painter, QRect(0, 0, 80, 80));

    setWindowTitle(tr("Calendar Desktop Widget"));
    setProductIcon(QIcon(pixmap));
    setProductName(tr("Calendar Desktop Widget"));
    setVersion("v0.0.1");
    setDescription("显示最近7天日程安排的桌面挂件，用户在系统日历软件中修改日程安排，数据会自动同步到桌面挂件上。"
                   "用户可以勾选任务的完成状态、创建快速任务、设置任务的模式等。");

    setWebsiteName("Gitee  dde-calendar 桌面日历挂件");
    setWebsiteLink("https://gitee.com/moriv4/CalendarDesktopWidget");
    setLicense("GPL3");

    addSpacing(50);
    setFixedWidth(350);
}
